package com.ssm.service;

import com.ssm.dao.StudentMapper;
import com.ssm.pojo.Student;

import java.util.List;

public class StudentServiceImpl implements StudentService{
    private StudentMapper studentMapper;
    public void setStudentMapper(StudentMapper studentMapper){this.studentMapper=studentMapper;}
    @Override
    public int addStudent(Student student) {

        return studentMapper.addStudent(student);
    }

    @Override
    public List allStudent() {
        return studentMapper.allStudent();
    }

    @Override
    public Student queryStudentBySid(int sId) {
        return studentMapper.queryStudentBySid(sId);
    }

    @Override
    public int updateStudentBySId(Student student) {
        return studentMapper.updateStudentBySId(student);
    }

    @Override
    public int deleteStudentBySid(int sId) {
        return studentMapper.deleteStudentBySid(sId);
    }

    @Override
    public List allStudentBysDormId(int sDormId) {
        return studentMapper.allStudentBysDormId(sDormId);
    }
}
